<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <#include "/include/base/header.ftl">
    <style>
        .table-head{
            background-color: #f2f6fc;color: #303133;
        }
        .form-unit{
            font-size: 14px;
        }
        .form-unit i{
            margin-right: 5px;
        }
        .money{
            color: #f56c6c;
        }
    </style>
</head>
<body>
<div class="wrapper">
    <div class="main-content">
        <div class="box box-main">
            <form id="inputForm" action="${ctx}/mall/order/delivery">
                <input type="hidden" name="id" value="${mallOrder.id!}">
                <div class="box-body" style="padding: 20px;">
                    <div class="form-unit no-margin"><i class="fa fa-list-alt"></i>商品信息</div>
                    <div class="row">
                        <div class="col-xs-12">
                            <table class="table table-bordered table-hover">
                                <tr class="table-head">
                                    <td width="75">商品图片</td>
                                    <td>商品名称</td>
                                    <td width="75">商品价格</td>
                                    <td width="75">商品数量</td>
                                </tr>
                                <#list mallOrder.orderItemList as orderItem>
                                    <tr>
                                        <td style="text-align: center;vertical-align: middle;"><img src="${orderItem.goodsPic}" style="width: 40px;height: 40px;"/></td>
                                        <td>${orderItem.goodsName}</td>
                                        <td style="vertical-align: middle;" class="money">￥${(orderItem.goodsPrice/100)?string('0.00')}</td>
                                        <td style="vertical-align: middle;">${orderItem.goodsNum}</td>
                                    </tr>
                                </#list>
                            </table>
                        </div>
                    </div>
                    <div class="form-unit no-margin"><i class="fa fa-list-alt"></i>收货人信息</div>
                    <div class="row">
                        <div class="col-xs-12">
                            <table class="table table-bordered table-hover">
                                <tr class="table-head">
                                    <td width="180">收货人</td>
                                    <td width="180">手机号码</td>
                                    <td>收货地址</td>
                                </tr>
                                <tr>
                                    <td>${mallOrder.mallOrderAddress.receiverName}</td>
                                    <td>${mallOrder.mallOrderAddress.phone}</td>
                                    <td>${mallOrder.mallOrderAddress.provinceName!}${mallOrder.mallOrderAddress.cityName!}${mallOrder.mallOrderAddress.areaName!}${mallOrder.mallOrderAddress.address}</td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<#include "/include/base/footer.ftl">
<script>
    //保存操作
    function submitForm() {
        //loading
        var index = window.parent.layer.load(1, {
            shade: [0.3,'#fff'], //0.1透明度的白色背景
        });
        $.ajax({
            url: $("#inputForm").attr("action"),
            type: "POST",
            data: $('#inputForm').serialize(),
            success: function(result){
                window.parent.layer.close(index);
                window.parent.layer.msg(result.msg, { time: 2000 });
                if(result.code == "SUCCESS"){
                    window.parent.layer.closeAll();
                    window.frames.parent['iframepage'].contentWindow.search();
                }
            }
        })
    }
</script>
</html>